.page-chat {
  width: 100%;
  height: 100vh;
  background-color: #2e2f3d;
  position: fixed;
  .message-box{
    display: flex;
    align-items: center;
    height: 60px;
    background-color: #f5f5f5;
    border-bottom: 1px;
    position: fixed;
    top: env(safe-area-inset-top);
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    .left{
      width: 23%;
      background-color: #f5f5f5;
      position: relative;
      &::after {
        content: " ";
        position: absolute;
        right: 4px;
        bottom: -22px;
        display: block;
        width: 2px;
        height: 60px;
        font-size: 0;
        background-color: #fff;
      }
    }
    .right {
      // .online-status {
      //   color: red;
      // }
      .in {
        color: #ff0000;
      }
      .out {
        color: #999999;
       }
    }
  }
  .chat-box {
    position: relative;
    display: flex;
    width: 100%;
    background: #ffffff;
    height: calc(100vh - 60px);
    padding-top: calc(60px + env(safe-area-inset-top));
  }

  .base {
    min-height: 535px;
    padding-bottom: 0rem !important;
    flex-direction: column;
  }

  /* 左侧用户名和商家栏样式 */
  .chat-box {
    position: relative;
    display: flex;
    width: 100%;
    background: #ffffff;
    .chat-box-left {
      width: 30%;
      height: 100%;
      background: #ffffff;
      opacity: 1;
      border-right: 1px solid #eceef0;
      overflow: auto;
    }
  }

  /* 右侧主要信息聊天栏 */
  .chat-box {
    .chat-box-right {
      width: 100%;
      height: 100%;
    }
  }

  .chat-box-right {
    .shop-name-tittle {
      line-height: 20px;
      padding: 20px 0px 21px 21px;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #333333;
      border-bottom: 1px solid #ebedf0;
    }

    .im-box {
      display: flex;
      height: 100%;
    }

    .im-main {
      width: 70%;
      height: 100%;
      border-right: 1px solid #ebedf0;
    }
  }

  .shop-name-tittle {
    .shopStatus {
      margin: 5px;
    }

    .in {
      color: red;
    }

    .out {
      color: #999;
    }
  }

  .im-main {
    .chat-main-form {
      position: relative;
      display: flex;
      flex-direction: column;
      height: 100%;
      .display-infor {
        height: 80%;
        padding-top: 15px;
        overflow-y: auto;
        box-sizing: border-box;
      }

      .reply {
        width: 100%;
        height: 20%;
        border-top: 1px solid #ebedf0;
        position: relative;

        .upload {
          width: 22px;
          height: 18px;
          background-image: url('@/assets/images/chat/upload.png');
          margin: 17px 0 8px 22px;
          cursor: pointer;

          &:hover {
            background-image: url('@/assets/images/chat/upload-on.png');
          }
        }

        .reply-area {
          textarea {
            margin-left: 12px;
            border: none;
            resize: none;
            width: 98%;
          }
        }

        .send {
          width: 62px;
          height: 26px;
          line-height: 26px;
          position: absolute;
          right: 20px;
          bottom: 16px;
          text-align: center;
          background: #e1251b;
          color: #fff;
          cursor: pointer;
          opacity: 1;
          border-radius: 13px;
        }
      }
    }
  }
.message-list {
    width: 100%;
    height: 100%;
    overflow: auto;
    .avatar {
      img {
        width: 40px;
        height: 40px;
      }
    }
}
  /* 主要聊天信息栏 */
  .row {
    padding: 30rpx;

    &:first-child {
      margin-top: 20upx;
    }

    .my {
      .left {
        width: 100%;
        display: flex;
        margin-bottom: 20px;
        justify-content: flex-end;
        flex-wrap: wrap;
        .bubble {
  

          .squareimage {
            width: 300rpx;
            height: 300rpx;
          }
        }

        .bubble.red-envelope {
          .blessing {
            position: absolute;
            bottom: 14%;
            color: #e9b874;
            width: 80%;
            text-align: center;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
          }
        }

        .no-bg {
          background-color: none;
        }

        .bubble.play {
          .icon {
            &:after {
              border-left: solid 10upx rgba(240, 108, 122, 0.5);
              animation: my-play 1s linear infinite;
            }
          }
        }

        .username {
          width: 100%;
          font-size: 12px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          margin-bottom: 5px;
          color: #a1a6af;
          color: #999;
          display: flex;
          align-items: center;
          justify-content: flex-end;

          .name {
            max-width: 70%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }

          .time {
            text-align: center;
            margin-left: 40rpx;
          }
        }
      }

      .right {
        flex-shrink: 0;
        width: 80upx;
        height: 80upx;
        margin-top: 20px;
        margin-left: 12px;
        margin-left: 15upx;

        .avatar {
          width: 34px;
          height: 34px;
          margin-right: 20px;
        }

        image {
          width: 80upx;
          height: 80upx;
          border-radius: 10upx;
        }
      }

      width: 100%;
      display: flex;
      justify-content: flex-end;
    }

    .other {
      .right {
        width: 100%;
        display: flex;
        margin-bottom: 20px;
        flex-wrap: wrap;
        margin-left: -8px;

        .bubble {
          max-width: 70%;
          font-size: 14px;
          min-height: 42px;
          padding: 12px 14px 11px 16px;
          word-break: break-word;
          box-sizing: border-box;
          opacity: 1;
          border-radius: 0rem 8px 8px 8px;
          background-color: #f3f3f3;
          color: #333;

          .longimage {
            width: 100px;
            height: 100px;
          }

          .squareimage {
            width: 300rpx;
            height: 300rpx;
          }
        }

        .bubble.red-envelope {
          .blessing {
            position: absolute;
            bottom: 14%;
            color: #e9b874;
            width: 80%;
            text-align: center;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
          }
        }

        .username {
          width: 100%;
          font-size: 12px;
          font-family: Microsoft YaHei;
          font-weight: 400;
          margin-bottom: 5px;
          color: #a1a6af;
          color: #999;
          display: flex;
          align-items: center;

          .name {
            max-width: 70%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
          }
        }

        .bubble.play {
          .icon {
            &:after {
              border-right: solid 10upx rgba(255, 255, 255, 0.8);
              animation: other-play 1s linear infinite;
            }
          }
        }
      }

      .left {
        flex-shrink: 0;
        width: 80upx;
        height: 80upx;
        margin-top: 20px;
        margin-left: 12px;
        margin-right: 15upx;

        .avatar {
          width: 34px;
          height: 34px;
          margin-right: 20px;
        }

        image {
          width: 80upx;
          height: 80upx;
          border-radius: 10upx;
        }
      }

      width: 100%;
      display: flex;
    }
  }

  .phone-icon {
    width: 60rpx;
    height: 60rpx;
  }

  @keyframes my-play {
    0% {
      transform: translateX(80%);
    }

    100% {
      transform: translateX(0%);
    }
  }

  @keyframes other-play {
    0% {
      transform: translateX(-80%);
    }

    100% {
      transform: translateX(0%);
    }
  }

  .windows {
    .mask {
      position: fixed;
      top: 100%;
      width: 100%;
      height: 100%;
      z-index: 1000;
      background-color: rgba(0, 0, 0, 0.6);
      opacity: 0;
      transition: opacity 0.2s ease-out;
    }

    .layer {
      position: fixed;
      width: 80%;
      height: 70%;
      left: 10%;
      z-index: 1001;
      border-radius: 20upx;
      overflow: hidden;
      top: 100%;
      transform: scale3d(0.5, 0.5, 1);
      transition: all 0.2s ease-out;
    }
  }

  .windows.show {
    display: block;

    .mask {
      top: 0;
      opacity: 1;
    }

    .layer {
      transform: translate3d(0, -85vh, 0) scale3d(1, 1, 1);
    }
  }

  .windows.hide {
    display: block;

    .mask {
      top: 0;
      opacity: 0;
    }
  }

  .open-redenvelope {
    width: 100%;
    height: 70vh;
    background-color: #cf3c35;
    position: relative;

    .top {
      width: 100%;
      background-color: #fe5454;
      display: flex;
      justify-content: center;
      flex-wrap: wrap;
      border-radius: 0 0 100% 100%;
      box-shadow: inset 0 -20upx 0 #9c1712;
      margin-bottom: 65upx;

      .close-btn {
        width: 100%;
        height: 80upx;
        display: flex;
        justify-content: flex-end;
        margin-bottom: 30upx;

        .icon {
          color: #9c1712;
          margin-top: 10upx;
          margin-right: 10upx;
        }
      }

      image {
        width: 130upx;
        height: 130upx;
        border: solid 12upx #cf3c35;
        border-radius: 100%;
        margin-bottom: -65upx;
      }
    }

    .from {
      width: 90%;
      padding: 5upx 5%;
      display: flex;
      justify-content: center;
      font-size: 32upx;
      color: #fff;
    }

    .blessing {
      width: 90%;
      padding: 5upx 5%;
      display: flex;
      justify-content: center;
      font-size: 32upx;
      color: #fff;
    }

    .money {
      width: 90%;
      padding: 5upx 5%;
      display: flex;
      justify-content: center;
      font-size: 32upx;
      color: #fff;
      font-size: 100upx;
      color: #f8d757;
      display: flex;
      padding-top: 20upx;
    }

    .showDetails {
      width: 90%;
      padding: 5upx 5%;
      display: flex;
      justify-content: center;
      font-size: 32upx;
      color: #fff;
      position: absolute;
      bottom: 20upx;
      align-items: center;
      font-size: 28upx;
      color: #f8d757;

      .icon {
        font-size: 26upx;
        color: #f8d757;
      }
    }
  }

  .flex-wrap {
    flex: auto;
  }

  /* 返回图标 */
  .back-icon {
    position: absolute;
    left: 0;
    top: 36rpx;
    width: 50rpx;
    height: 30rpx;
    transform: rotate(90deg);
  }

  .shop-tit {
    text-align: center;
    max-width: 80%;
    margin: 0 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  /* 系统提示 */
  .sys-tips {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  .tips-content {
    color: #999999;
    font-size: 28rpx;
  }

  /* 中间时间样式 */
  .topTime {
    text-align: center;
    margin-bottom: 15px;
    height: 28rpx;
    font-size: 10px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 28rpx;
    color: #aaaaaa;
    opacity: 1;
  }

  /* 右侧正在查询和我的订单 */
  .order-column {
    flex: 1;

    .tab-switch {
      display: flex;
      height: 37px;
    }

    .inquiry {
      flex: 1;
      text-align: center;
      line-height: 37px;
      cursor: pointer;
      font-size: 12px;
      border-bottom: 1px solid #eceef0;
      background: #f8f8f8;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #999999;
      opacity: 1;
    }

    .my-order {
      flex: 1;
      text-align: center;
      line-height: 37px;
      cursor: pointer;
      font-size: 12px;
      border-bottom: 1px solid #eceef0;
      background: #f8f8f8;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: #999999;
      opacity: 1;
    }

    .active {
      color: #e1251b;
      background-color: #fff;
      border: none;
    }

    .browse {
      width: 100%;
      border-bottom: 1px solid #eceef0;
      text-align: center;
      font-size: 14px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 14px;
      color: #666666;
      opacity: 1;
    }

    .text {
      width: 100px;
      padding: 11px 0 5px 0rem;
      margin: auto;
      border-bottom: 2px solid #e1251b;
    }
  }

  /* 订单商品详情 */
  .recent-list {
    padding-left: 12px;
    height: calc(100% - 98px);
    overflow-y: auto;
  }

  .order-list {
    padding-left: 12px;
    height: calc(100% - 70px);
    overflow-y: auto;
  }

  .prod-item {
    display: flex;
    padding: 18px 0;
    border-bottom: 1px solid #eceef0;
    border-top: 1px solid #eceef0;
    margin-top: -1px;

    .prod-detail {
      padding-right: 12px;
      flex: 1;
    }

    .gift-group {
      text-align: left;
      padding-left: 2%;
      padding-top: 1%;

      .gift-item {
        display: flex;

        .giveaway-item-name {
          white-space: pre-wrap;
          padding-top: 1%;
        }

        .giveaway-item-sku-count {
          padding-left: 2%;
        }
      }
    }

    img {
      width: 60px;
      height: 60px;
      margin-right: 12px;
    }

    .prod-name {
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 18px;
      color: #333333;
      opacity: 1;
      word-break: break-word;
      cursor: pointer;
    }

    .interval {
      width: 100%;
      height: 10px;
      background: #faf9f9;
      opacity: 1;
    }
  }

  .order-column {
    .order-list {
      .botl {
        border-bottom: 9px solid #faf9f9;
        flex-direction: column;
        padding-bottom: 0;
      }
    }
  }

  .prod-b {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;

    .prod-price {
      margin-top: 5px;
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 18px;
      color: #e1251b;
      opacity: 1;
    }

    .prod-send {
      padding: 0 5px;
      height: 24px;
      cursor: pointer;
      text-align: center;
      border: 1px solid #e9eaec;
      opacity: 1;
      border-radius: 12px;
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 24px;
      color: #333333;
      opacity: 1;

      &:hover {
        border: 1px solid #e1251b;
        color: #e1251b;
      }
    }
  }

  /* 我的订单样式 */
  .order-box {
    display: flex;
    .prod-box{
      display: flex;
      flex:1;
    }
    .number {
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 14px;
      color: #666666;
      opacity: 1;
    }

    .time {
      font-size: 12px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      line-height: 14px;
      color: #666666;
      opacity: 1;
    }
  }

  .order-number {
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding-bottom: 6px;
    border-bottom: 1px solid #ebedf0;
    margin-bottom: 12px;

    .number {
      cursor: pointer;
      display: inline-block;
      margin-right: 16px;
    }

    .send-number {
      display: inline-block;
      margin-right: 22px;
      cursor: pointer;

      &:hover {
        color: #e1251b;
      }
    }
  }

  .order-list {
    .bottom-tips {
      text-align: center;
      padding-top: 20px;
    }
  }

  .recent-list {
    .bottom-tips {
      text-align: center;
      padding-top: 20px;
    }
  }

  /* 发送链接样式 */
  .link-box {
    padding: 10px 10px 0 10px;
    background: #ffffff;
    border: 1px solid #f2f2f2;
    opacity: 1;
    width: 50%;
    transform: translateX(50%);
    margin-bottom: 10px;
    .prod-number {
      margin-bottom: 2px;
      cursor: pointer;
    }
  }

  .link-prod {
    display: flex;
    padding-bottom: 9px;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;

    img {
      width: 88px; 
      height: 88px;
    }

    .link-detail {
      width: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      margin-top: 1px;
      margin-left: 13px;
    }

    .prod-price {
      display: flex;
      justify-content: space-between;
      font-size: 10px;
      font-family: PingFang SC;
      padding-bottom: 5px;
      font-weight: 400;
      color: #999999;
      opacity: 1;
      word-break: break-all;
    }

    .payment-amount {
      flex: 1;
    }

    .prod-status {
      width: 35%;
      text-align: end;
    }
  }

  .link-detail {
    .prod-name {
      font-size: 10px;
      font-family: PingFang SC;
      padding-top: 5px;
      font-weight: 400;
      color: #333333;
      opacity: 1;
      word-break: break-word;
      cursor: pointer;
    }
  }

  .link-send {
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 400;
    line-height: 49px;
    text-align: center;
    color: #e43130;
    cursor: pointer;
  }

  .link-send-right {
    width: 5px;
    height: 9px;
    margin-left: 7px;
    display: inline-block;
    background: url('@/assets/images/chat/link-send.png');
  }

/* 商品链接样式 */
.prod-link {
    width: 345px;
    background: #ffffff;
    border: 1px solid #f2f2f2;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding: 15px 13px 0px 12px;
    cursor: pointer;

    .prod-number {
      margin-top: -7px;
      margin-bottom: 5px;
      border-bottom: 1px solid #eceef0;
      padding-bottom: 5px;

      &:hover {
        color: #9c1712;
      }
    }
}

  .prod-number {
    cursor: pointer;
  }

  .prod-no {
    padding: none;
    border-bottom: none;
  }

  .left {
    .message-box {
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }
  }

  /* 已读未读 */
  .unread {
    font-size: 12px;
    color: #aaaaaa;
    margin-right: 9px;
  }

  /* 图片上传 */
  .search-btnn {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .imgUp {
    display: inline-block;
    position: absolute;
    height: 18px;
    left: 22px;
    top: 17px;
  }

  .imgUp:hover {
    background-image: url('@/assets/images/chat/upload-on.png');
    cursor: pointer;
  }

  /* 图片放大 */
  /*遮罩层样式*/
  .img-layer {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  /* 点击加载更多 */
  .display-infor .more {
    font-size: 12px;
    color: #5a606b;
    text-align: center;
    margin-bottom: 12px;
    cursor: pointer;
    -moz-user-select: none; /*火狐*/
    -webkit-user-select: none; /*webkit浏览器*/
    -ms-user-select: none; /*IE10*/
    -khtml-user-select: none; /*早期浏览器*/
    user-select: none;
  }

  /* 重新登录提示弹窗 */
  .login-baBox {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: #2e2f3d;
  }

  .un-read-tips {
    background-color: #fff;
    padding: 15px;
    padding: 5px 10px 5px 10px;
    font-size: 12px;
    border-radius: 20px 20px 20px 20px;
    position: absolute;
    color: #E43130;
    top: 10px;
    right: 100px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    align-items: center;
    -webkit-box-shadow: 1px 1px 5px 0 #aaa;
    box-shadow: 1px 1px 5px 0 #aaa;
  }

  .un-read-icon {
    width: 12px;
    height: 12px;
    margin-right: 5px;
    margin-bottom: 1px;
  }


  @media screen and (max-width: 1680px) {
    .body .chat-box {
      opacity: 1;
      /* width: 960px; */
      margin: 20px auto 20px auto;
    }
    .body {
      position: absolute;
      height: calc(100vh + 200px)
      /* height: auto; */
    }
  }

  /* 新消息过来 背景颜色 以及 选中的背景颜色 */
  .chat-box-left .shop-list .newMessage {
    background-color: #FFF9cd;
  }

  .chat-box-left .shop-list .changeUser {
    background-color: #D2E6F9;
  }

  /* 放大图片的右侧关闭图标 */
  .bubble .el-image-viewer__close {
    color: red !important
  }

  .row .other .right .bubble .bubble-text {
    white-space: pre-line;
  }
  :deep(.el-image-viewer__canvas img){
    height: auto !important;
    width: auto !important;
  }
  :deep(.el-image-viewer__wrapper){
    z-index: 9999 !important;
  }
}
.message {
	display: flex;
  flex-direction: column;
  align-items: flex-start;
	margin: 10px;
  position: relative;
  .bubble-left{
    background-color: #f7f8fa;
    max-width: 100%;
    font-size: 14px;
    min-height: 42px;
    padding: 12px 14px 11px 16px;
    word-break: break-word;
    box-sizing: border-box;
    color: #000;
    opacity: 1;
    border-radius: 0 10px 10px;
    margin-left: 10px;
    margin-top: 20px;
  }
	.bubble {
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 0px 10px 10px 10px;
		color: black;
 
		.text {
			display: flex;
			text-align: left;
			font-size: 14px;
			max-width: 250px;
			word-break: break-all;
		}
	}
  .username {
    position: absolute;
    top: 0;
    left: 3px;
    margin-left: 50px;
    margin-bottom: 2px;
  }
	.avatar {
		width: 40px;
		height: 40px;
		background-color: rgb(255, 255, 255);
		border-radius: 20px;
		display: flex;
		align-items: center;
		justify-content: center;
		font-size: 16px;
		color: white;
	}
	.status {
		font-size: 12px;
		color: #d0e9ff;
		margin-left: 10px;
		margin-bottom: 5px;
		display: flex;
		align-items: center;
	}
}
.message.right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
	justify-content: flex-end;
  .read-status{
    font-size: 12px;
    color: #aaa;
    margin-right: 9px;
    display: flex;
    align-items: center;
  }
}
.bubble.right {
	border-radius: 10px 0px 10px 10px;
	color: black;
	margin-right: 10px;
  max-width: 70%;
}
.bubble-content {
  max-width: 100%;
  font-size: 14px;
  min-height: 42px;
  padding: 12px 14px 11px 16px;
  word-break: break-word;
  box-sizing: border-box;
  background-color: #d0e9ff;
  color: #000;
  opacity: 1;
  border-radius: 8px 0rem 8px 8px;
}
.longimage {
  width: 100px;
  height: 100px;
}